import request from "./request"
export default {
    // 获取home页面的表格数据
    getHomeData(params){
        return request({
            url:'/home/getHomeData',
            method:'get',
            data:params,
            mock:true
        })
    },

    // 获取home页面的右上角卡片数据
    getHomeCard(){
        return request({
            url:'/home/getHomeCard',
            method:'get',
            mock:true
        })
    },
    getHomeEcharts(){
        return request({
            url:'/home/getHomeEcharts',
            method:'get',
            mock:true
        })
    },
    getUserData(params){
            return request({
                url:'/user/getUser',
                method:'get',
                mock:true,
                data:params

            })
    },
    // 新增用户
    addUserData(params){
        return request({
            url:'/user/addUser',
            method:'post',
            data:params,
            mock:false
        })
    },
    // 编辑用户
    updateUserData(params){
        return request({
            url:'/user/editUser',
            method:"post",
            data:params,
            mock:false
        })
    },
    // 删除用户
    deleteUserData(params){
        return request({
            url:'/user/deleteUser',
            method:'get',
            data:params,
            mock:false
        })
    },
    // 登录
    login(params){
        return request({
            url:'/login',
            method:'post',
            data:params,
            mock:false
        })
    }
    
}